import request from '@/utils/request'
import RequestObject from "@/utils/requestObject";

export function login(data) {
  return request({
    url: '/api/TUsers/LoginPost',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/api/TUsers/GetInfo',
    method: 'get'
  })
}

export function getFileToken() {
  return request({
    url: '/api/TUsers/getFileToken',
    method: 'get'
  })
}

export function getButtons() {
  return request({
    url: '/api/tbuttons',
    method: 'get',
    params: {
      requestObject: JSON.stringify(RequestObject.CreateGetObject())
    }
  })
}

export function logout() {
  return request({
    url: '/api/TUsers/logout',
    method: 'post'
  })
}
